import http from '@/utils/request'

// 获取商品
export function getGoodsList(params) {
	return http.post('/shop/goods/list', params)
}

// 添加商品
export function addGoods(params) {
	return http.post('/shop/goods/add', params)
}

// 获取商品
export function getGoods(goodsId) {
	return http.get('/shop/goods/detail/' + goodsId)
}

// 修改商品
export function editGoods(params) {
	return http.post('/shop/goods/edit', params)
}

// 移动商品到新的分类
export function moveGoods(param) {
	return http.post('/shop/goods/moveGroup',param)
}

// 上架
export function upSale(param) {
	return http.post('/shop/goods/upSale',param)
}

// 下架
export function downSale(param) {
	return http.post('/shop/goods/downSale',param)
}

// 删除
export function deleteBatch(param) {
	return http.post('/shop/goods/delete',param)
}

export function getRecommended() {
	return http.get('/shop/recommended/list')
}

// 添加到推荐
export function addRecommended(param) {
	return http.post('/shop/recommended/add',param)
}

// 选择规格
export function selectGuige() {
	return http.get('/shop/goods/select/guige')
}
